feat: GDPR PII export, account deletion & audit trail#357
Open
agent20usd wants to merge 1 commit intorohitdash08:mainfrom
Open
feat: GDPR PII export, account deletion & audit trail#357agent20usd wants to merge 1 commit intorohitdash08:mainfrom
agent20usd wants to merge 1 commit intorohitdash08:mainfrom
Conversation
Implements three endpoints under /gdpr: - GET /gdpr/export — collects all user-linked data (profile, categories, expenses, recurring expenses, bills, reminders, subscriptions) into a structured JSON response. Excludes password_hash. Logs a PII_EXPORT audit event. - POST /gdpr/delete — permanently deletes the user account after password re-verification. Leverages existing ON DELETE CASCADE foreign keys to remove all associated records. Audit log entry survives via ON DELETE SET NULL, preserving compliance records after deletion. - GET /gdpr/audit — returns the authenticated user's audit trail sorted by most recent first. Includes 18 tests covering: auth guards, export completeness, password verification, cascade deletion, audit log persistence, and edge cases. Closes rohitdash08#76
corrideluca
pushed a commit
to corrideluca/ai-mm
that referenced
this pull request
Mar 10, 2026
- PR #357: rohitdash08/FinMind#357 - 3 endpoints, 18 tests, 449 lines - Updated bounty tracking with submission details Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
|
Hi @rohitdash08 👋 Just wanted to check in — this PR implements the full GDPR PII Export & Delete workflow for #76 with 18 tests covering all acceptance criteria. No new dependencies needed, and it follows the existing codebase patterns. Happy to make any changes if you have feedback. Looking forward to your review! Thanks for maintaining this project 🙏 |
Owner
|
@CorradoZDeLuca, please connect over discord for the feedback @geekster007 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the GDPR PII Export & Delete workflow requested in #76:
GET /gdpr/export— Collects all user-linked data (profile, categories, expenses, recurring expenses, bills, reminders, subscriptions) into a structured JSON download. Excludespassword_hash. Logs aPII_EXPORTaudit event.POST /gdpr/delete— Permanently deletes the user account after password re-verification. Uses the existingON DELETE CASCADEforeign keys for clean removal. Writes anACCOUNT_DELETEDaudit log entry that survives deletion viaON DELETE SET NULL.GET /gdpr/audit— Returns the user's audit trail sorted by most recent first.Implementation Details
@jwt_required(), SQLAlchemy queriesroutes/gdpr.py, newtests/test_gdpr.py, updatedroutes/__init__.pycheck_password_hash)Tests
18 tests covering:
Checklist
/claim #76
Closes #76